


//
//  DemoMarqueen.m
//  WMZBanner
//
//  Created by wmz on 2019/12/19.
//  Copyright © 2019 wmz. All rights reserved.
//

#import "DemoMarqueen.h"
#import "WMZBannerView.h"
@interface DemoMarqueen ()

@end

@implementation DemoMarqueen

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
     /*
      *横向
      */
     WMZBannerParam *param =  BannerParam()
     .wFrameSet(CGRectMake(10, BannerHeight/6, BannerWitdh-20, BannerHeight/4))
     .wDataSet([self getData])
    //开启跑马灯
     .wMarqueeSet(YES)
     //开启循环滚动
     .wRepeatSet(YES)
     //速率
    .wMarqueeRateSet(0.6);
     WMZBannerView *viewOne = [[WMZBannerView alloc]initConfigureWithModel:param];
     [self.view addSubview:viewOne];
    
    
     /*
      *纵向
      */
     WMZBannerParam *param1 =  BannerParam()
     .wFrameSet(CGRectMake(10, BannerHeight/2, BannerWitdh-20, BannerHeight/4))
     .wDataSet([self getData])
    //开启跑马灯
     .wMarqueeSet(YES)
     //开启循环滚动
     .wRepeatSet(YES)
    //不可拖动
     .wCanFingerSlidingSet(NO)
     //纵向
     .wVerticalSet(YES);
    
     WMZBannerView *viewOne1 = [[WMZBannerView alloc]initConfigureWithModel:param1];
     [self.view addSubview:viewOne1];
}

- (NSArray*)getData{
    return @[
      @"http://res1.eqh5.com/5572bd27-1766-4100-a549-2695ad6116e1.png",
      @"http://res1.eqh5.com/00f79722-a279-4256-966b-a1e20212a401.png",
      @"http://res1.eqh5.com/a8797ecd-bb42-49b6-8d7f-6f4bb9b9c7ed.png",
      @"http://res1.eqh5.com/7d054413-3c53-47e2-8dde-abf2a8b01711.png"
      ];
}
- (void)dealloc{
    
}
@end
